source "$METIS_HOME"metis-plugin.config

_pluginName=`basename $0 | sed -r 's/.sh$//'`
_pluginOutputDirectory="${pluginDir}${_pluginName}/"
mkdir ${_pluginOutputDirectory}

if [ -n "$1" ]; then
        timeout="$1"
else
        timeout=120
fi
threads=20

query='select ipaddress from services where service = "microsoft-ds" or port = "445"'
cmd="${m_net_rpc} share -l -S \${1} -U ''%'' &> ${_pluginOutputDirectory}\${1}.winShareEnum" # net rpc share -l -S 10.10.12.163 -U ''%''

"$pythonInterpreter" "$q2ex" -d "$database" -q "$query" -c "$cmd" -t "$threads" -T "$timeout" -o "$_pluginOutputDirectory" -e "$_pluginName" -L "$logginglevel" -O "$outputLog"

